Component({
  properties: {
    show: {
      type: Boolean,
      value: false
    }
  },

  methods: {
    onClose() {
      this.setData({ show: false });
      this.triggerEvent('close');
    },

    // 编辑资料
    handleEdit() {
      this.onClose();
      wx.navigateTo({
        url: '/pages/my/modifyInfo/modifyInfo'
      });
    },

    // 退出登录
    handleLogout() {
      wx.showModal({
        title: '提示',
        content: '确定要退出登录吗？',
        success: (res) => {
          if (res.confirm) {
            this.onClose();
            this.triggerEvent('logout');
          }
        }
      });
    }
  }
}); 